home *** CD-ROM | disk | FTP | other *** search
- Path: lonweb.lehman.com!news
- From: jrojas@lehman.com
- Newsgroups: comp.lang.c++
- Subject: Re: How to initialize an array of structures?
- Date: Thu, 11 Jan 96 11:22:34 PDT
- Organization: Lehman Brothers
- Message-ID: <4d2s3k$g0p@lonweb1.lehman.com>
- References: <4d240e$nk5@jupiter.planet.net>
- NNTP-Posting-Host: lonefgdev129.lonefgdev.lehman.com
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
-
-
- > Could someone explain how to do this properly:
- >
- > struct FUNCTIONMAP
- > {
- > char *functionname;
- > int functionnumber;
- > int maxargs;
- > int functarg[5];
- >
- > };
- >
- > static struct FUNCTIONMAP functionlist[300];
- try :
-
- static struct FUNCTIONMAP functionlist[300] =
- { {"firstfunction",1,3,{2,2,2,0,0}},
- {"secondfunction", 3,4,{6,7,2,4}},
- ...
- ...
- {"300functions",2,3,{4,5,6,7,8}} };
-
-